package com.woniu.park.service;

import com.woniu.park.controller.form.UserForm;
import com.woniu.park.entity.Order;
import com.woniu.park.entity.Parkspace;
import com.woniu.park.entity.Totalorder;
import com.woniu.park.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.park.util.Result;

import java.util.List;
import java.sql.ResultSet;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cxb
 * @since 2020-09-05
 */
public interface IUserService extends IService<User> {


    User findByUsername(String principal);

    Set<String> findRoleById(Integer userId);

    Set<String> findPermById(Integer userId);

    /*
        根据身份证查id
     */
    int acquireId(String userIdnumber);
    //根据userId查询车位信息表得到车位信息
    List<Parkspace> findParkById(int userId);

    Order findByParkspaceId(int parkspaceId);

    User findByUserId(int orderUserId);

    /*
        注册
     */
    Result registerCode(UserForm userForm);

    String code(int userId);


    List<Order> findByParkspaceIdNotStatus(List<Integer> parkspaceIds);
    /*
        修改密码
     */
    void changePassword(int userId,String confirmPassword);

    boolean send(String phoneNum, String templateCode, Map<String,Object> code);
}
